USE [Training]
GO

IF NOT EXISTS (SELECT * from dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.training_api_SkillInsert'))
	EXEC('CREATE PROC dbo.training_api_SkillInsert AS')
GO

ALTER PROC dbo.training_api_SkillInsert
	@Title		nvarchar(200),
	@DocID		int = null,
	@SkillID	int output
AS
	INSERT INTO Skill(
		Title,
		DocID)
	VALUES(
		@Title,
		@DocID)
	SELECT @SkillID = SCOPE_IDENTITY()
